net: Prevent overflows when allocating memory for arrays
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 18:04:43 +0000 (18:04 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commitab91352c4af65a07f4e34c909921d37cccea9601
tree73511c6d30f6deb85fada6162281e21e1cbf54fc
parent6ab3b37a696d14b8c743323f873ac9ba1ee8fd26
net: Prevent overflows when allocating memory for arrays

Use grub_calloc() when allocating memory for arrays to ensure proper
overflow checks are in place.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Prevent-overflows-when-allocating-memory-for-arrays.patch
grub-core/net/dns.c
grub-core/net/net.c